// const BACE_URL = 'http://3888n9t950.wicp.vip:27194/'

const BACE_URL = 'http://172.16.40.118:8080/'



//自己封装的请求借口函数

export const myRequest = (options) =>{
	return new Promise((resolve, reject) =>{
		uni.request({
			url: BACE_URL + options.url,
			method: options.method || 'GET',
			data: options.data || {},
			success: (res) =>{
				if(res.data.code !== 0){
					return uni.showToast({
						title:'获取数据失败'
						
					
					})
				}
				resolve(res)
			},
			fail:(err) =>{
				return uni.showToast({
					title:'请求借口失败'
				}).
				reject(err)
			}
		})
	})
}